import { Decimal } from 'decimal.js';
// 加法
export const mathJsAdd = (num1, num2) => {
	return Number(new Decimal(num1 || 0).add(new Decimal(num2 || 0)));
};
// 减法
export const mathJsSub = (num1, num2) => {
	return Number(new Decimal(num1 || 0).sub(new Decimal(num2 || 0)));
};
// 除法
export const mathJsDiv = (num1, num2) => {
	return Number(new Decimal(num1 || 0).div(new Decimal(num2)));
};
// 乘法
export const mathJsMul = (num1, num2) => {
	return Number(new Decimal(num1 || 0).mul(new Decimal(num2 || 0)));
};
